<h1>Listing events</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Start time</th>
    <th>End time</th>
    <th>Description</th>
    <th>Age restriction</th>
    <th>Confirmation status</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @events.each do |event| %>
  <tr>
    <td><%= event.name %></td>
    <td><%= event.start_time %></td>
    <td><%= event.end_time %></td>
    <td><%= event.description %></td>
    <td><%= event.age_restriction %></td>
    <td><%= event.confirmation_status %></td>
    <td><%= link_to 'Show', event %></td>
    <td><%= link_to 'Edit', edit_event_path(event) %></td>
    <td><%= link_to 'Destroy', event, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Event', new_event_path %>
